package classes.Commands
{
	import components.editor.c_baseElement;
	import components.editor.c_textElement;
	
	public class c_applyText extends c_baseCommand {
		private var _newText: String;
		private var _prevText: String;
		public function c_applyText(a_element: c_textElement, a_newText: String, a_prevText: String) {
			super(a_element);
			_newText 	= a_newText;
			_prevText 	= a_prevText;
		}
		
		protected function get textElement(): c_textElement {
			return element as c_textElement;
		}
		
		override public function Execute():void {
			textElement.text = _newText;
		}
		
		override public function unExecute():void {
			textElement.text = _prevText;
		}		
	}
}